<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
	$(function(){
		$("#pointPerLevel").change(function(){
			$.ajax({
				type:"get",
				url:"getPointForRequest.do",
				data: "level="+$(this).val(),
				dataType:"json",
				success:function(jsonData){
					$("#pointView").html("- "+jsonData+" pt");
				}
			});
		});
	});
	
/* 	$(".questionForm").submit(function(){
		  var comentLength = 0;
		   var tempvalue = "";
		   var cvalue = "";
		   comentLength = f.coment.value.length;
		   for( i = 0; i < comentLength; i++) {
			     var retCode = f.coment.value.charCodeAt(i);
			    var retChar = f.coment.value.substring(i,i+1).toUpperCase();
		    if ((retChar < "0" || retChar > "9") && (retChar < "A" || retChar > "Z") && ((retCode > 255) || (retCode < 0))) { // 한글인경우
			     tempvalue = f.coment.value.substring(i,i+1);
			     cvalue += tempvalue;
		  	   if(i != 0 && i %30 == 0) {
		    		 cvalue += "rn";}
		    }else { // 한글이 아닌경우
			     tempvalue = f.coment.value.substring(i,i+1);
			     cvalue += tempvalue;
			     if(i != 0 && i %60 == 0) 
			    	 cvalue += "rn";
		 	   } 
		   }
		   

		
		
		return false;
	}); */
	var q=document.questionForm.title.value;
	var q=document.questionForm.content.value;
</script>
</head>
<body>
<h1 align="center">멘토에게 질문하기</h1>
<form action="sendMentorQuestion.do" name="questionForm">
<table border="1" bordercolor="white" align="center">	
	<tr>
		<td>멘토레벨</td>
		<td>
			<select id="pointPerLevel" name="level">
				<option>선택</option>
				<c:forEach items="${requestScope.llist }" var="l">
				<option value="${l }">${l }</option>
				</c:forEach>
			</select>
			<span id="pointView"></span>
		</td>
	</tr>
	<tr>
		<td>질문 내용</td>
		<td>
			<textarea name="content" cols="40" rows="15" style="margin: 4px 0px 0px; width: 300px; height: 208px; resize:none"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="3" align="center">
			<input type="submit" value="질문"> &nbsp; &nbsp; &nbsp;
			<input type="button" value="취소">
		</td>
	</tr>
</table>
</form>
</body>
</html>